/*
 * XML Type:  contentDigestType
 * Namespace: info:fedora/fedora-system:def/foxml#
 * Java type: fedora.fedoraSystemDef.foxml.ContentDigestType
 *
 * Automatically generated - do not modify.
 */
package fedora.fedoraSystemDef.foxml.impl;
/**
 * An XML contentDigestType(@info:fedora/fedora-system:def/foxml#).
 *
 * This is a complex type.
 */
public class ContentDigestTypeImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements fedora.fedoraSystemDef.foxml.ContentDigestType
{
    private static final long serialVersionUID = 1L;
    
    public ContentDigestTypeImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName TYPE$0 = 
        new javax.xml.namespace.QName("", "TYPE");
    private static final javax.xml.namespace.QName DIGEST$2 = 
        new javax.xml.namespace.QName("", "DIGEST");
    
    
    /**
     * Gets the "TYPE" attribute
     */
    public fedora.fedoraSystemDef.foxml.ContentDigestType.TYPE.Enum getTYPE()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(TYPE$0);
            if (target == null)
            {
                return null;
            }
            return (fedora.fedoraSystemDef.foxml.ContentDigestType.TYPE.Enum)target.getEnumValue();
        }
    }
    
    /**
     * Gets (as xml) the "TYPE" attribute
     */
    public fedora.fedoraSystemDef.foxml.ContentDigestType.TYPE xgetTYPE()
    {
        synchronized (monitor())
        {
            check_orphaned();
            fedora.fedoraSystemDef.foxml.ContentDigestType.TYPE target = null;
            target = (fedora.fedoraSystemDef.foxml.ContentDigestType.TYPE)get_store().find_attribute_user(TYPE$0);
            return target;
        }
    }
    
    /**
     * True if has "TYPE" attribute
     */
    public boolean isSetTYPE()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().find_attribute_user(TYPE$0) != null;
        }
    }
    
    /**
     * Sets the "TYPE" attribute
     */
    public void setTYPE(fedora.fedoraSystemDef.foxml.ContentDigestType.TYPE.Enum type)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(TYPE$0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(TYPE$0);
            }
            target.setEnumValue(type);
        }
    }
    
    /**
     * Sets (as xml) the "TYPE" attribute
     */
    public void xsetTYPE(fedora.fedoraSystemDef.foxml.ContentDigestType.TYPE type)
    {
        synchronized (monitor())
        {
            check_orphaned();
            fedora.fedoraSystemDef.foxml.ContentDigestType.TYPE target = null;
            target = (fedora.fedoraSystemDef.foxml.ContentDigestType.TYPE)get_store().find_attribute_user(TYPE$0);
            if (target == null)
            {
                target = (fedora.fedoraSystemDef.foxml.ContentDigestType.TYPE)get_store().add_attribute_user(TYPE$0);
            }
            target.set(type);
        }
    }
    
    /**
     * Unsets the "TYPE" attribute
     */
    public void unsetTYPE()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_attribute(TYPE$0);
        }
    }
    
    /**
     * Gets the "DIGEST" attribute
     */
    public java.lang.String getDIGEST()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(DIGEST$2);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "DIGEST" attribute
     */
    public org.apache.xmlbeans.XmlString xgetDIGEST()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(DIGEST$2);
            return target;
        }
    }
    
    /**
     * True if has "DIGEST" attribute
     */
    public boolean isSetDIGEST()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().find_attribute_user(DIGEST$2) != null;
        }
    }
    
    /**
     * Sets the "DIGEST" attribute
     */
    public void setDIGEST(java.lang.String digest)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(DIGEST$2);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(DIGEST$2);
            }
            target.setStringValue(digest);
        }
    }
    
    /**
     * Sets (as xml) the "DIGEST" attribute
     */
    public void xsetDIGEST(org.apache.xmlbeans.XmlString digest)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(DIGEST$2);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(DIGEST$2);
            }
            target.set(digest);
        }
    }
    
    /**
     * Unsets the "DIGEST" attribute
     */
    public void unsetDIGEST()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_attribute(DIGEST$2);
        }
    }
    /**
     * An XML TYPE(@).
     *
     * This is an atomic type that is a restriction of fedora.fedoraSystemDef.foxml.ContentDigestType$TYPE.
     */
    public static class TYPEImpl extends org.apache.xmlbeans.impl.values.JavaStringEnumerationHolderEx implements fedora.fedoraSystemDef.foxml.ContentDigestType.TYPE
    {
        private static final long serialVersionUID = 1L;
        
        public TYPEImpl(org.apache.xmlbeans.SchemaType sType)
        {
            super(sType, false);
        }
        
        protected TYPEImpl(org.apache.xmlbeans.SchemaType sType, boolean b)
        {
            super(sType, b);
        }
    }
}
